<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
</head>
<body >
<!--
view

-->
<div ng-app>
<div ng-controller="firstController">
    <input type="text" ng-model="name" value="">
    <input type="text" ng-model="age" value="">
    <!--angularjs的表达式-->
    <!--{{name}}-->
    <!--{{age}}-->
    <span ng-bind="name"></span>
    <span ng-bind="age"></span>
    <div ng-controller="secondController">

        <input type="text" ng-model="name" value="">
        <span ng-bind="name"></span>
    </div>
</div>
</div>
<script>
    <!--js变量作用域-->
    function first(){
        var name = '张三';
//        alert(a);
        function  second() {
//            alert(name);
            var name = '李四';
            alert(name);
            var  a = 1;
        }
    }
</script>

<!--<input type="text" ng-model="name" value="">-->
<script type="text/javascript" src="app/index.js"></script>

<script src="../../vendor/angular/angularjs.js" type="text/javascript"></script>
</body>
</html>